<template>
  <div class="header-box">
    <div class="logo"></div>
    <div class="btnbox">
      <div>
        <div class="btn">
          <i class="iconfont icon-zuoyou" aria-hidden="true"></i>
        </div>
        <div class="btn">
          <i class="iconfont icon-zuoyou1" aria-hidden="true"></i>
        </div>
      </div>
    </div>
    <div class="search-box">
      <el-input
        placeholder="请输入内容"
        v-model="keyword"
        class="input-with-select"
        style="height:40px"
      >
        <el-button slot="append" icon="el-icon-search"></el-button>
      </el-input>
    </div>
    <div class="menu">
      <div>
        <div class="btn">
          <i class="iconfont icon-shezhi2" aria-hidden="true"></i>
          <!-- <i class="fa fa-cog" aria-hidden="true"></i> -->
        </div>
        <div class="btn" @click="minimize">
          <i class="iconfont icon-zuixiaohua1" aria-hidden="true"></i>
        </div>
        <div class="btn" @click="maximize">
          <i class="iconfont icon-zuidahua1" aria-hidden="true"></i>
          <!-- <i class="fa fa-cog" aria-hidden="true"></i> -->
        </div>
        <div class="btn" @click="exit">
          <i class="iconfont icon-close" aria-hidden="true"></i>
          <!-- <i class="fa fa-window-close" aria-hidden="true"></i> -->
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      keyword: null,
    }
  },
  methods: {
    exit() {
      this.$electron.ipcRenderer.send("exit")
    },
    maximize() {
      console.log("窗口最大化")
      this.$electron.ipcRenderer.send("maximize")
    },
    minimize() {
      this.$electron.ipcRenderer.send("minimize")
    },
  },
}
</script>
<style lang="scss" scoped>
.header-box {
  height: 50px;
  width: 100%;
  display: flex;
  background: white;
  .logo {
    height: 100%;
    width: 200px;
  }
  .btnbox {
    padding-left: 10px;
    width: 100px;
    display: flex;
    justify-content: start;
    align-items: center;
    div {
      display: flex;
      .btn {
        height: 30px;
        width: 30px;
        background: white;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .btn:hover {
        cursor: pointer;
      }
      .btn:nth-child(1) {
        border-right: 1px solid #ccc;
      }
    }
  }
  .search-box {
    flex: auto;
    display: flex;
    justify-content: start;
    align-items: center;
    overflow: hidden;
    /deep/ .el-input__inner {
      height: 30px !important;
    }
    /deep/ .el-input {
      height: 30px !important;
      width: 270px !important;
    }
  }
  .menu {
    width: 130px;
    display: flex;
    justify-content: end;
    align-items: center;
    div {
      display: flex;
      div {
        height: 30px;
        width: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
      }
    }
    .btn:hover {
      cursor: pointer;
    }
    .icon-zuixiaohua1 {
      font-size: 19px;
    }
  }
}
</style>
